//
//  PlayManager.h
//  MusicDemo
//
//  Created by xalo on 16/6/16.
//  Copyright © 2016年 Mario. All rights reserved.
//

#import <Foundation/Foundation.h>
//制作协议
@protocol PlayManagerDelegate <NSObject>
//把播放的时间信息和进度传递到label和slide上
- (void)playManagerDelegateFetchTotalTime:(NSString *)totalTimer currentTime:(NSString *)currentTime progress:(CGFloat)progress;
//自动切歌
- (void)playToNextMusic;
@end

@interface PlayManager : NSObject
//设置代理
@property (nonatomic,weak)id<PlayManagerDelegate>delegate;

+(instancetype)sharedManager;
//暂停
- (void)pauseMusic;
//播放
- (void)playMusic;
//准备去播放
-  (void)prepareToPlayMusicWithUrl:(NSString *)url;
//快进快退
- (void)playMusicWithSlideValue:(CGFloat)progress;
//是否正在播放
- (BOOL)isPlaying;
@end
